package com.lizemin.inputoutput.filter;

import lombok.extern.slf4j.Slf4j;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @author lzm
 * @date 2025/4/5 10:41
 * @description
 */
@WebFilter("/*")
@Slf4j
public class Afilter implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        log.info("进入了A过滤器...");
        chain.doFilter(request, response);
        log.info("这是A过滤器放行请求后的代码...");
        throw new RuntimeException("这是A过滤器抛出的异常");
    }
}
